/**
This file is part of Gel2DE.

    Gel2DE is free software: you can redistribute it and/or modify
    it under the terms of the GNU Lesser General Public License as published by
    the Free Software Foundation, either version 3 of the License, or
    (at your option) any later version.

    Gel2DE is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU Lesser General Public License for more details.

    You should have received a copy of the GNU Lesser General Public License
    along with Gel2DE.  If not, see <http://www.gnu.org/licenses/>.

	Copyright (C) 2012, University of Bergen
*/

#pragma once

#include "vtkColorTransferFunction.h"
#include "vtkFileOutputWindow.h"
#include <vector>

class TransferFunctionManager
{
public:
  TransferFunctionManager(vtkFileOutputWindow* aLogFile);
  ~TransferFunctionManager(void);

  vtkColorTransferFunction * getTransferFunction(unsigned int nr);
  vtkColorTransferFunction * getCurrentTransferFunction();
  unsigned int getSize();
  void getColor(double v, double &red, double &green, double &blue);
  double getRed(double v);
  double getGreen(double v);
  double getBlue(double v);
  void LoadCTF(std::string aFileName);

  unsigned int setCurrentCtf(unsigned int ctfId);

private:

  std::vector <vtkColorTransferFunction*> m_ctfList;
  unsigned int m_currentCtf;
  vtkOutputWindow *m_logFile;

};
